﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Base2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            // GroupBox中控件的遍历
            foreach(Control c in this.groupBox1.Controls)
            {

            }

            // Panel中控件的遍历
            foreach(Control c in this.panelDetail.Controls)
            {

            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (this.panelDetail.Visible)
                this.panelDetail.Visible = false;
            else
                this.panelDetail.Visible = true;
        }
    }
}
